package com.kongchengji.spider.util;
//import com.google.gson.Gson;
//import com.sun.javaws.security.Resource;
//import org.apache.commons.io.IOUtils;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//
//
//
//import java.io.IOException;
//import java.nio.charset.Charset;
//
//public class DataBaseUtil {
//    @Value("classpath:database.json")
//    private Resource databaseFile;
//    @Bean
//    public List<Database> databases() throws IOException {
//        String databasesString = IOUtils.toString(databaseFile.getInputStream(), Charset.forName("UTF-8"));
//        List<Database> databases = new Gson().fromJson(databasesString, new TypeToken<List<Database>>() {
//        }.getType());
//        return databases;
//    }
//}
